﻿// See https://aka.ms/new-console-template for more information
using System.Text;
using VirginiaDecode.Models;
namespace Decode
{
    class Program
    {
        /// <summary>
        /// 维吉尼亚加密和解密
        /// </summary>
        static void Main(string[] args)
        {
            //输入一段字母明文plain和密钥key
            Console.WriteLine("请输入密文");
            String ciphern = Console.ReadLine();
            Console.WriteLine("请输入已知密钥");
            String key = Console.ReadLine();
            //赋值属性，实现解密
            Mycode mycode = new Mycode();
            mycode.Cipher = ciphern;
            mycode.Key = key;
            mycode.Decode();
            //输出密文
            Console.WriteLine($"维吉尼亚解密后的明文：{mycode.Plaint}");
        }
    }
}
